package org.yx.service.smat.view_printed_material_sn;

import com.xiaoleilu.hutool.bean.BeanUtil;
import org.dbist.dml.Page;
import org.yx.utils.BaseService;

import java.util.Map;

/**
 * 查询已经打印过的物料标签条码
 *
 * @author zxw
 * @since 2023/03/14
 **/
public class SmatViewPrintedMaterialSnService extends BaseService {
    public SmatViewPrintedMaterialSnOut viewPrintedMaterialSn(SmatViewPrintedMaterialSnIn in) throws Exception {
        Map<String, Object> mapParm = BeanUtil.beanToMap(in);
        mapParm.put("orgCode",in.getUserOrgCode());
        Page<MaterialReceiveLabel> pageLabel = selectPageBySqlFilePath("select_material_receive_label", mapParm, MaterialReceiveLabel.class, in.getPageIndex(), in.getPageSize());

        SmatViewPrintedMaterialSnOut out = new SmatViewPrintedMaterialSnOut();
        out.setLblList(pageLabel.getList());
        out.setTotalSize(pageLabel.getTotalSize());

        return out;
    }
}